Observable

public interface Observable<T extends Event>

An observable object.

An observable object can have one or more observers. Each observer is associated with a particular event class.

Parameters

<T>

the common type of the observed events

Inheritors

Functions

Link copied to clipboard
public abstract Subscription on<E extends T>(Class<E> eventClass, Observer<E> observer)
Subscribes the given event observer to receive the events of the given eventClass.
Link copied to clipboard
public final Subscription subscribe<E extends Event>(Observer<E> observer)
public final Subscription subscribe<E extends Event>(Observer<E> observer)

Subscribes the given observer to receive events of type E from this Observable.